/**
 * 
 */
package com.wsj.util.tool;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author fengbin  createTime:2009-7-20
 *
 *  数字工具
 */
public class NumberUtil {
	
	/********
	 * 检验字符串是否数字
	 * @param str
	 * @return
	 */
	public static final boolean isNumber(String str){
		boolean isNum=false;
		if(str!=null  && !str.equals("")){
			
			Pattern p = Pattern.compile("^[0-9]+$");
			Matcher m = p.matcher(str);
			isNum = m.matches();
		}
		
		return isNum;
		
	}
	

	
	
	

}
